home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_8.zip / DOC.ZIP / FIRST.ADA < prev    next >
Text File  |  1993-08-17  |  2KB  |  35 lines

  1. --
  2. --    Program : First.ada
  3. --    Purpose : This program is a "first" Ada program, similar to C 
  4. --              "Hello World" program.  It is intended to help the user
  5. --              start using the GWUMON program by providing a program
  6. --              which would be easy to get up and running.
  7. --
  8. --    To use with GWUMON : To use this program with GWUMON, from the command
  9. --              line type:
  10. --                       adacomp -a -b -mfirst first.ada
  11. --                       gwumon -mfirst
  12. --
  13. --    Take the default options on the first screen (speed = 6, exceptions = yes,
  14. --              and tasks = no) by hitting the "Esc" key.  Take the defaults on
  15. --              the second screen (Small window, line tracing, and no procedure
  16. --              tracing) by hitting the "Esc" key again.
  17. --    Now the monitor should be running, stopped at the first executable 
  18. --              statement, the elboration of name.  Hit the space key until
  19. --              the program asks for your name.  Type in your name, then 
  20. --              hit return.  Continue to hit the space key until the program
  21. --              completes execution.
  22. --
  23. WITH Text_IO; USE Text_IO;
  24.  
  25. PROCEDURE First IS
  26.         String_Size : CONSTANT NATURAL := 30;
  27.         Name : String(1..String_Size) := "                              ";
  28.         Return_Size : NATURAL;
  29. BEGIN
  30.         PUT_LINE( "Please type in your name");
  31.         GET_LINE( Name, Return_Size );
  32.         PUT_LINE( "Hello, " & Name );
  33. END;
  34.  
  35.